package org.magicsoft.office.excel.model;

import org.magicsoft.office.db.SQLType;
import org.magicsoft.office.exception.ModelException;

public class PrimaryKey {

	private String column = null;

	private SQLType sqlType = null;

	private IDGenerator idGenerator = null;

	public PrimaryKey(String column, SQLType sqlType, IDGenerator idGenerator) {
		if (sqlType == SQLType.CHAR || sqlType == SQLType.NCHAR) {
			throw new ModelException("请使用varchar或nvarchar替代。");
		}

		this.column = column;
		this.sqlType = sqlType;
		this.idGenerator = idGenerator;
	}

	public String getColumn() {
		return column;
	}

	public void setColumn(String column) {
		this.column = column;
	}

	public SQLType getSqlType() {
		return sqlType;
	}

	public void setSqlType(SQLType sqlType) {
		this.sqlType = sqlType;
	}

	public IDGenerator getIdGenerator() {
		return idGenerator;
	}

	public void setIdGenerator(IDGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

}
